<!DOCTYPE html>
<html>

<head>
    <title>味爱地图</title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/reset.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/format.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/style.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_534934_o9qj2m9h34z5xw29.css">
</head>
<body>
<header>
    <h1 class="title xl">代金券</h1>
    <i class="iconfont icon-back max z-in cell-left clickbetter" onclick="window.location.href='/rest/front/user/toMyPage'"></i>
    <div class="underline"></div>
</header>
<div class="content juan">
    <div class="juan-item item middle flex" data-type="8.8">
        <div class="cell-main cell-left">
            <div class=" name red">8.8折抵用券</div>
            <div class="desc hui m">股东好友专享，不与其他优惠同时使用</div>
        </div>
        <a href="javascript:;" class="weui-btn voucher-btn l">去生成</a>
    </div>
    <div class="juan-item item middle flex" data-money="1000">
        <div class="cell-main cell-left">
            <div class=" name red">充800得1000</div>
            <div class="desc hui m">股东好友专享，不与其他优惠同时使用</div>
        </div>
        <a href="javascript:;" class="weui-btn voucher-btn l">去生成</a>
    </div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>
<script>
    $(function () {
        $('.voucher-btn').click(function () {
            var type=$(this).parents('.juan-item').data('type');
            var money=$(this).parents('.juan-item').data('money');
            type? window.location.href='/rest/front/voucher/toSetVoucher?type='+type: window.location.href='/rest/front/voucher/toSetCashVoucher?num='+money;
        })
    })
</script>
</html>